how to prepare key in object dyamically javascript

134

how to prepare key in object dyamically javascript -

function resolve(path, obj) {
    return path.split('.').reduce(function(prev, curr) {
        return prev ? prev[curr] : null
    }, obj || self)
}

Comments

Submit
0 Comments